<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
		
		<link href="images/admin.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
	
		<script src="{yun:}$config.sy_weburl{/yun}/js/jquery-1.8.0.min.js?v={yun:}$config.cachecode{/yun}"></script>
	
		<link href="{yun:}$config.sy_weburl{/yun}/js/layui/css/layui.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
	
		<script src="{yun:}$config.sy_weburl{/yun}/js/layui/layui.js?v={yun:}$config.cachecode{/yun}"></script>
		<script src="{yun:}$config.sy_weburl{/yun}/js/layui/phpyun_layer.js?v={yun:}$config.cachecode{/yun}"></script>
		<script src="js/admin_public.js?v={yun:}$config.cachecode{/yun}" language="javascript"></script>
	
		{yun:}if $config.code_kind == 3{/yun}
		
			<script src="{yun:}$config.sy_weburl{/yun}/js/geetest/gt.js?v={yun:}$config.cachecode{/yun}"></script>
			<script src="{yun:}$config.sy_weburl{/yun}/js/geetest/pc.js?v={yun:}$config.cachecode{/yun}" type="text/javascript"></script>
		{yun:}elseif $config.code_kind == 4{/yun}
		
			<script src="https://cdn.dingxiang-inc.com/ctu-group/captcha-ui/index.js"></script>
			<script>var dxappid = "{yun:}$config.sy_dxappid{/yun}";</script>
			<script src="{yun:}$config.sy_weburl{/yun}/js/dingxiang/pc.js?v={yun:}$config.cachecode{/yun}" type="text/javascript"></script>
		{yun:}/if{/yun}
		
		<title>{yun:}$config.sy_webname{/yun} - 分站后台管理中心</title>
	</head>
	
	<script>
		var	weburl 		= 	'{yun:}$config.sy_weburl{/yun}',
			code_web 	= 	'{yun:}$config.code_web{/yun}',
			code_kind 	= 	'{yun:}$config.code_kind{/yun}';
	
			function checkform(){
				
				if($('#username').val()==''){
					layer.msg('请填写管理员账户！', 2, 8);return false;  
				}
				
				if($('#password').val()==''){
					layer.msg('请填写登录密码！', 2, 8);return false;  
				}
				
				var codesear	=	new RegExp('后台登录');
				
				if(codesear.test(code_web)){
					
					if(code_kind==1){
					
						authcode=	$("#ipt_code").val();
						
						if(authcode==''){
							layer.msg('请填写验证码！', 2, 8);return false;  
							return false;
						}
					}else if(code_kind==3){
						
						var geetest_challenge	= 	$('input[name="geetest_challenge"]').val();
						var geetest_validate	= 	$('input[name="geetest_validate"]').val();
						var geetest_seccode		= 	$('input[name="geetest_seccode"]').val();
						
						if(geetest_challenge =='' || geetest_validate=='' || geetest_seccode==''){
			
							$("#bind-submit").trigger("click");
								return false; 
						}
					}else if(code_kind==4){
						
						var dx_token = $('input[name="dx_token"]').val();
						if(dx_token == ''){
							$("#bind-submit").trigger("click");
								return false; 
						}
					}
				}
		return true;
	}
			
	function checkCode(id){
		if(document.getElementById(id)){
			document.getElementById(id).src=weburl+"/app/include/authcode.inc.php?"+Math.random();
		}
	}
	</script>

	<body>
	
		<div class="siteadmin_logintop"></div>
		
		<div class="siteadmin_loginbox">
			<div class="siteadmin_loginbox_leftimg"></div>
			
			<div class="siteadmin_loginbox_cont">
				
				<div class="siteadmin_logintop_name">
					<span class="siteadmin_logintop_name_c">
						{yun:}$config.sy_webname{/yun}后台管理系统 <span class="siteadmin_logintop_name_beta">PHPYun V5.0 beta</span>
					</span>
				</div>
				
				<div id="bind-captcha" data-id='sublogin' data-type='submit'></div>
				<iframe id="supportiframe"  name="supportiframe" onload="returnmessage('supportiframe');" style="display:none"></iframe>
				<form action="" method="post" target="supportiframe" id='sublogin' onsubmit='return checkform();' >
		 
		    		<ul class="logoin_list">
						<li>
							<label for="username"> </label>
				        	<div class="siteadmin_loginbox_text">
				        		<i class="siteadmin_loginbox_text_icon"></i>
				        		<input type="text" class="ipt" size="10" name="username" value="" placeholder="请输入账号" />
				        	</div>
				        </li>
				        
						<li>
							<label for="password"></label>
				         	<div class="siteadmin_loginbox_text">
				        		<i class="siteadmin_loginbox_text_icon siteadmin_loginbox_text_icon_mm"></i>
				         		<input type="password" class="ipt" name="password" value=""  placeholder="请输入密码"/>
				         	</div>
				       	</li>
				       	
				        {yun:}if strpos($config.code_web,"后台登录") !== false{/yun}
						
							{yun:}if $config.code_kind==3 || $config.code_kind==4{/yun}
								
								<div class="gtdx-captcha">
									<input type='hidden' id="geetest_challenge"  name="geetest_challenge" value="">
									<input type='hidden' id="geetest_validate"  name="geetest_validate" value="">
									<input type='hidden' id="geetest_seccode"  name="geetest_seccode" value="">
									<input type='hidden' id="dx_token"  name="dx_token" value="">
									<input type='hidden' id="popup-submit">	
									<input type='hidden' id="bind-submit">
								</div>
							{yun:}else{/yun}
							  	
							  	<li>
									<span  class="logoin_list_b"><label for="code">&nbsp; </label></span>
								 	<div class="siteadmin_loginbox_text" style="width:100px; float:left">
						            	<i class="siteadmin_loginbox_text_icon siteadmin_loginbox_text_icon_mm"></i>
						         		<input type="text" id="ipt_code" class="ipt_code" placeholder="验证码" name="authcode" value="" />
						         	</div>
						         	<a href="javascript:void(0);" onclick="checkCode('vcode_imgs');"><img src="{yun:}$config.sy_weburl{/yun}/app/include/authcode.inc.php" id='vcode_imgs' align="absmiddle" >&nbsp;换一张?</a>
									<input type="hidden" id="code_kind" value="1" />
								</li>
							{yun:}/if{/yun}
					    {yun:}/if{/yun} 
						
						<li><input type="submit" class="siteadmin_loginbox_bth" name="login_sub" value="登录" /></li>
				  	</ul>
					
					<input type="hidden" name="pytoken" value="{yun:}$pytoken{/yun}">
				</form>
			</div>
		</div>
		
		<div class="clear"></div>
	</body>
</html>